package hrm.action.factory;

import hrm.action.Action;
import hrm.action.ActionFactory;
import hrm.action.system.SysMenuBeforeCodeInsertAction;
import hrm.action.system.SysMenuCodeInsertAction;
import hrm.action.system.SysMenuCodeSearchAction;
import hrm.action.system.SysMenuCodeUpdateAction;
import hrm.action.system.SysMenuIndexAction;
import hrm.action.system.schedule.MyMenuAddScheduleAction;
import hrm.action.system.schedule.MyMenuBeforeAddScheduleAction;
import hrm.action.system.schedule.MyMenuBeforeUpdateScheduleAction;
import hrm.action.system.schedule.MyMenuCalendarAction;
import hrm.action.system.schedule.MyMenuDeleteScheduleAction;
import hrm.action.system.schedule.MyMenuDetailScheduleAction;
import hrm.action.system.schedule.MyMenuScheduleAction;
import hrm.action.system.schedule.MyMenuUpdateScheduleAction;



public class SysMenuActionFactory implements ActionFactory {
	private static SysMenuActionFactory factory;
	
	public static SysMenuActionFactory getInstance(){
		if(factory==null){
			factory=new SysMenuActionFactory();
		}
		return factory;
	}

	public Action getAction(String command){
		Action action=null;
		if(command.equalsIgnoreCase("index")){
			action=new SysMenuIndexAction();
		}else if(command.equalsIgnoreCase("codesearch")){
			action=new SysMenuCodeSearchAction();
		}else if(command.equalsIgnoreCase("codeupdate")){
			action=new SysMenuCodeUpdateAction();
		}else if(command.equalsIgnoreCase("bfcodeinsert")){
			action=new SysMenuBeforeCodeInsertAction();
		}else if(command.equalsIgnoreCase("codeinsert")){
			action=new SysMenuCodeInsertAction();
		}else if(command.equalsIgnoreCase("schedule")){
			action=new MyMenuScheduleAction();
		}else if(command.equalsIgnoreCase("calendar")){
			action=new MyMenuCalendarAction();
		}else if(command.equalsIgnoreCase("goaddschedule")){
			action=new MyMenuBeforeAddScheduleAction();
		}else if(command.equalsIgnoreCase("addschedule")){
			action=new MyMenuAddScheduleAction();
		}else if(command.equalsIgnoreCase("detail")){
			action=new MyMenuDetailScheduleAction();
		}else if(command.equalsIgnoreCase("bfupdate")){
			action=new MyMenuBeforeUpdateScheduleAction();
		}else if(command.equalsIgnoreCase("deleteschedule")){
			action=new MyMenuDeleteScheduleAction();
		}else if(command.equalsIgnoreCase("updateschedule")){
			action=new MyMenuUpdateScheduleAction();
		}
			
		return action;
	}//
}
